﻿using GalaSoft.MvvmLight;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DeviceDebugger.Model
{
    public class StackerModel : ObservableObject
    {

        #region 数据库中字段
        private string _name;
        private string _IPAdress;
        private Int64 _Id;
        private int _rowCount;
        private int _columCount;
        private int _layerCount;
        private int _lanewayNo;

        /// <summary>
        /// 所属巷道
        /// </summary>
        public int LanewayNo
        {
            get { return _lanewayNo; }
            set { _lanewayNo = value; RaisePropertyChanged(() => LanewayNo); }
        }
        /// <summary>
        /// 层总数
        /// </summary>
        public int LayerCount
        {
            get { return _layerCount; }
            set { _layerCount = value; RaisePropertyChanged(() => LayerCount); }
        }

        /// <summary>
        /// 列总数
        /// </summary>
        public int ColumCount
        {
            get { return _columCount; }
            set { _columCount = value; RaisePropertyChanged(() => ColumCount); }
        }

        /// <summary>
        /// 排总数
        /// </summary>
        public int RowCount
        {
            get { return _rowCount; }
            set { _rowCount = value; RaisePropertyChanged(() => RowCount); }
        }

        /// <summary>
        /// 堆垛机ID，自增列
        /// </summary>
        public Int64 Id
        {
            get { return _Id; }
            set { _Id = value; RaisePropertyChanged(() => Id); }
        }

        /// <summary>
        /// IP地址
        /// </summary>
        public string IPAdress
        {
            get { return _IPAdress; }
            set { _IPAdress = value; RaisePropertyChanged(() => IPAdress); }
        }

        /// <summary>
        /// 堆垛机名称
        /// </summary>
        public string Name
        {
            get { return _name; }
            set { _name = value; RaisePropertyChanged(() => Name); }
        }
        #endregion

        #region 程序运行所需字段
        private int _verticalTroubleCode;
        /// <summary>
        /// 垂直故障代码
        /// </summary>
        public int VerticalTroubleCode
        {
            get { return _verticalTroubleCode; }
            set { _verticalTroubleCode = value; RaisePropertyChanged(() => VerticalTroubleCode); }
        }

        private int _levelTroubleCode;
        /// <summary>
        /// 水平故障代码
        /// </summary>
        public int LevelTroubleCode
        {
            get { return _levelTroubleCode; }
            set { _levelTroubleCode = value; RaisePropertyChanged(() => LevelTroubleCode); }
        }

        private int _forkTroubleCode;
        /// <summary>
        /// 货叉故障代码
        /// </summary>
        public int ForkTroubleCode
        {
            get { return _forkTroubleCode; }
            set { _forkTroubleCode = value; RaisePropertyChanged(() => ForkTroubleCode); }
        }

        private int _statusTroubleCode;
        /// <summary>
        /// 状态故障代码
        /// </summary>
        public int StatusTroubleCode
        {
            get { return _statusTroubleCode; }
            set { _statusTroubleCode = value; RaisePropertyChanged(() => StatusTroubleCode); }
        }

        private int _verticalPulse;
        /// <summary>
        /// 垂直脉冲
        /// </summary>
        public int VerticalPulse
        {
            get { return _verticalPulse; }
            set { _verticalPulse = value; RaisePropertyChanged(() => VerticalPulse); }
        }

        private int _levelPulse;
        /// <summary>
        /// 水平脉冲
        /// </summary>
        public int LevelPulse
        {
            get { return _levelPulse; }
            set { _levelPulse = value; RaisePropertyChanged(() => LevelPulse); }
        }

        private int _forkPulse_Single;
        /// <summary>
        /// 单叉脉冲
        /// </summary>
        public int ForkPulse_Single
        {
            get { return _forkPulse_Single; }
            set { _forkPulse_Single = value; RaisePropertyChanged(() => ForkPulse_Single); }
        }

        private int _forkPulse_Double;
        /// <summary>
        /// 双叉脉冲
        /// </summary>
        public int ForkPulse_Double
        {
            get { return _forkPulse_Double; }
            set { _forkPulse_Double = value; RaisePropertyChanged(() => ForkPulse_Double); }
        }
        private bool _fetchNothing;
        /// <summary>
        /// 取货无箱
        /// </summary>
        public bool FetchNothing
        {
            get { return _fetchNothing; }
            set { _fetchNothing = value; RaisePropertyChanged(() => FetchNothing); }
        }
        private bool _doubleIn;
        /// <summary>
        /// 双重入库
        /// </summary>
        public bool DoubleIn
        {
            get { return _doubleIn; }
            set { _doubleIn = value; RaisePropertyChanged(() => DoubleIn); }
        }

        private bool _fetchNothing2;
        /// <summary>
        /// 取深浅有
        /// </summary>
        public bool FetchNothing2
        {
            get { return _fetchNothing2; }
            set { _fetchNothing2 = value; RaisePropertyChanged(() => FetchNothing2); }
        }

        private bool _doubleIn2;
        /// <summary>
        /// 放深浅有
        /// </summary>
        public bool DoubleIn2
        {
            get { return _doubleIn2; }
            set { _doubleIn2 = value; RaisePropertyChanged(() => DoubleIn2); }
        }

        private bool _salverError;
        /// <summary>
        /// 托盘错误
        /// </summary>
        public bool SalverError
        {
            get { return _salverError; }
            set { _salverError = value; RaisePropertyChanged(() => SalverError); }
        }


        #endregion
    }
}
